home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / source / roadshow / startup.txt < prev    next >
Encoding:
Text File  |  1993-10-14  |  2.3 KB  |  86 lines

  1. Option Explicit
  2. Dim fViewerStarted As Integer
  3. Dim fMovieRepeat As Integer
  4.  
  5. Sub Form_Click ()
  6.     StartViewer
  7.     x = VwrCommand(vwr, szTitle, "PositionTopic(`main', 0, 0, 1023, 1023, 1, 1)", cmdOptNone)
  8.     Startup.Hide
  9.     
  10.     fMovieRepeat = False
  11.     Controller.Show
  12.     Movie.Command = "stop"
  13. End Sub
  14.  
  15. Sub Form_Load ()
  16.     
  17.     '
  18.     'Keep the user occupied with a nice movie while we
  19.     'get viewer started and load the title
  20.     '
  21.     
  22.     SetWindowPos hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
  23.     Movie.FileName = "avi\startup.avi"
  24.     Movie.hWndDisplay = MoviePicture.hWnd
  25.  
  26.     fViewerStarted = False
  27.     fMovieRepeat = True
  28.     Movie.Command = "open"
  29.     Movie.Command = "play"
  30.     
  31. End Sub
  32.  
  33. Sub Form_Resize ()
  34.     MoviePicture.Width = 200
  35.     MoviePicture.Height = 90
  36.     MoviePicture.Top = (ScaleHeight - MoviePicture.Height) / 2
  37.     MoviePicture.Left = (ScaleWidth - MoviePicture.Width) / 2
  38. End Sub
  39.  
  40. Sub Form_Unload (Cancel As Integer)
  41.     Movie.Command = "close"
  42. End Sub
  43.  
  44. Sub Movie_Done (NotifyCode As Integer)
  45.     If fMovieRepeat Then
  46.         Movie.To = 0
  47.         Movie.Command = "seek"
  48.         Movie.Command = "play"
  49.         Beep
  50.     End If
  51. End Sub
  52.  
  53. Sub StartViewer ()
  54.     Dim style As Long
  55.     '
  56.     ' By now we're up and running and the startup form is visible\
  57.     ' It's time to find the viewer title or start it up afresh
  58.     '
  59.     szTitle = "roadshow.mvb"
  60.     vwr = vwrFromMVB(szTitle)
  61.     If vwr = 0 Then
  62.         vwr = VwrCommand(0, szTitle, "HideButtonBar()", cmdOptNone)
  63.         If vwr = 0 Then
  64.             MsgBox szTitle, MB_ICONEXCLAMATION, "Can't load title"
  65.             End
  66.         End If
  67.     End If
  68.  
  69.     hwndVwr = HwndFromVwr(vwr)
  70.  
  71.     '
  72.     'Once viewer has been started we want to remove the
  73.     'caption bar, get rid of the menus and buttons and
  74.     'position it full screen.
  75.     '
  76.     'Note that we always use cmdOptNone to VwrCommand, we
  77.     'don't want any display until all is done.
  78.     'When all is done, jump to the front page
  79.     '
  80.     style = GetWindowLong(hwndVwr, GWL_STYLE)
  81.     xl = SetWindowLong(hwndVwr, GWL_STYLE, style And (Not WS_CAPTION))
  82.     x = VwrCommand(vwr, szTitle, "HideButtonBar()", cmdOptNone)
  83.     x = VwrCommand(vwr, szTitle, "HideMenuBar()", cmdOptNone)
  84. End Sub
  85.  
  86.